﻿
$("#FDinput").watermark("请输入辅导名称或辅导班名称");
$("#PXinput").watermark("请输入培训名称或培训班名称");
$("#LSinput").watermark("请输入老师名称或者老师编号");
$("#JGinput").watermark("请输入机构名称或者机构编号");
$(".topNava >cite").bind("click", function () {
    //$(".strongcite").removeClass("strongcite");
    var id = $(this).attr("id");
    $(this).addClass("strongcite").siblings().removeClass("strongcite");
    $(".sear-form").hide();
    $("#" + id + "Div").fadeIn();
})
$("#SCBZA").click(function () {
    AddFavorite(window.location, document.title);
});
$("#TZCDSXDIV").powerFloat({
    eventType: "click",
    target: $("#ChangNavaDiv"),
    position: "2-1"
});
$(".NeiRong>select").change(function () {
    var SelectValue = $(this).val();
    var NextSpan = $(this).next();
    var index = NextSpan.attr("id").replace("DHSPAN", "");
    $(this).val(index);
    var ChangeToSpan = $("#DHSPAN" + SelectValue);
    var NextSpanText = NextSpan.text();
    NextSpan.text(ChangeToSpan.text());
    ChangeToSpan.text(NextSpanText);

});
$(".rootnava,.parentnava").toggle(function () {
    var next = $(this).next();
   
    next.fadeOut();
    $(this).children("img");
    $(this).children("img").attr("src", "/Scripts/jquery-easyui-1.3.1/themes/icons/edit_add.png");
}, function () {
    var next = $(this).next();
    
    next.fadeIn();
    $(this).children("img").attr("src", "/Scripts/jquery-easyui-1.3.1/themes/icons/edit_remove.png");
});

$("#CancelSortNava").click(function () {
    $.powerFloat.hide();
});

$("#QDSortNava").click(function () {
    $('.leftNava').block({ message: '<img alt="加载中" src="/images/Loading/Uploader.gif" />', css: { border: 'none', backgroundColor: 'transparent'} });
    var LeftNava = "";
    var LeftNavaString = "";
    var XYXXGL = $("#XYXXGL").html();
    var BMXXGL = $("#BMXXGL").html();
    var PSDZGL = $("#PSDZGL").html();
    var KFFW = $("#KFFW").html();
    $(".NeiRong>span").each(function () {
        switch ($.trim($(this).text())) {
            case "学员学习管理":
                LeftNavaString += "学员学习管理" + ",";
                LeftNava += "<div id='XYXXGL'> " + XYXXGL + "</div>";
                break;
            case "报名信息管理":
                LeftNavaString += "报名信息管理" + ",";
                LeftNava += "<div id='BMXXGL'> " + BMXXGL + "</div>";
                break;
            case "配送地址管理":
                LeftNavaString += "配送地址管理" + ",";
                LeftNava += "<div id='PSDZGL'> " + PSDZGL + "</div>";
                break;
            case "客服服务":
                LeftNavaString += "客服服务" + ",";
                LeftNava += "<div id='KFFW'> " + KFFW + "</div>";
                break;
        }
    });
    $.post("../../GRZX/Default.aspx", { Check: "ChangNava", Nava: encodeURIComponent(LeftNavaString) }, function (ReturnMess) {
        if (ReturnMess == "success") {
            $('.leftNava').unblock();
            $("#leftNavaDiv").html(LeftNava);
        }
        else {
            $('.leftNava').unblock();
            alert(ReturnMess);
        }
    });
});
$("#AQTC").click(function () {
    $.post("../../CheckOut/Login.aspx", { Check: "LogOut" }, function (ReturnMess) {
        if (ReturnMess == "success") {
            alert("安全退出成功");
        }
        else {
            alert(ReturnMess);
        }
        window.location.href = '/';
    });

});
